/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-10-25
 * Time:10:48
 */
public class TestDemo {
    public static void main(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        binarySearchTree.insertTree(10);
        binarySearchTree.insertTree(41);
        binarySearchTree.insertTree(19);
        binarySearchTree.insertTree(5);
        binarySearchTree.insertTree(18);

        binarySearchTree.prevOrder(binarySearchTree.root);
        System.out.println();
        binarySearchTree.inOrder(binarySearchTree.root);
        System.out.println();
        System.out.println("=================================");
        binarySearchTree.remove(10);
        binarySearchTree.prevOrder(binarySearchTree.root);
        System.out.println();
        binarySearchTree.inOrder(binarySearchTree.root);
        System.out.println();
    }
}
